/**
 * Create in 2012-7-27.
 */
package kit4j.tests.jdk.swing.dnd.factory;

import kit4j.tests.jdk.swing.dnd.component.DragEnabledButton;


/**
 * 
 * @author MiniKnife
 *
 */
public class DragEnabledButtonFactory {
	
	private static int btnId = 0;

	public static DragEnabledButton createButton() {
		return new DragEnabledButton();
	}
	
	public static DragEnabledButton[] createButtons(int count) {
		DragEnabledButton[] btns = new DragEnabledButton[count];
		
		for(int i = 0; i < count; ++i) {
			btns[i] = new DragEnabledButton();
		}
		
		return btns;
	}
	
	public static DragEnabledButton[] createButtons(int count, String label) {
		DragEnabledButton[] btns = new DragEnabledButton[count];
		
		for(int i = 0; i < count; ++i) {
			btns[i] = new DragEnabledButton(label);
		}
		
		return btns;
	}
	
	public static DragEnabledButton[] createUniqueButtons(int count) {
		DragEnabledButton[] btns = new DragEnabledButton[count];
		
		for(int i = 0; i < count; ++i) {
			btns[i] = new DragEnabledButton(String.valueOf(btnId));
			
			++btnId;
		}
		
		return btns;
	}
	
}
